#ifndef ADRIVER_H
#define ADRIVER_H

#include <QObject>

class Buffer;
class QWidget;
class ADriver : public QObject
{
    Q_OBJECT
public:
    enum Error {k_start_failed, k_default_connection_failed};
    explicit ADriver(QObject *parent = 0);
    virtual ~ADriver(){}
    virtual int sample_rate() = 0;
    virtual int buffer_size() = 0;
    virtual void set_buffer(Buffer * buffer) = 0;
    virtual void set_process_callback(void(*process)())= 0;
    virtual QWidget * control_panel() = 0;
signals:
    void sample_rate_changed();
    void buffer_size_changed();
    void connection_changed();
    void error(int error_num);
public slots:
    virtual void start() = 0;
    virtual void stop() = 0;
};

#endif // ADRIVER_H
